<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app1">
        <input type="text" v-model='name'>
        <p>{{ name }}</p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el:'#app1',
            data:{
                name:'我的Vue程序'
            },
            created:function(){
                // 初始化
                console.log('初始化加载')
            },
            mounted:function(){
                // 元素绑定完成
                console.log('mounted触发')
            },
            updated:function(){
                // 初始化
                console.log('updated触发')
            }
        })
    </script>
</body>
</html>